[PATCH] [compiler-rt] Remove struct_termio_sz from sanitizer_platform_limits_posix.cpp
authorcqwrteur <100043421+trcrsired@users.noreply.github.com>
Sat, 26 Apr 2025 03:16:49 +0000 (11:16 +0800)
committerSylvestre Ledru <sylvestre@debian.org>
Thu, 25 Dec 2025 16:38:13 +0000 (17:38 +0100)
The `struct termio` and its associated code have been removed from glibc as they are considered obsolete. This change removes the corresponding code in compiler-rt to maintain compatibility.

Additionally, the check for `struct_termio_sz` specific to Android has been removed. There is no guarantee that the Linux kernel or Google will continue supporting `struct termio`, and its removal aligns with the deprecation in glibc.

Reference: glibc commit e04afb71771710cdc6025fe95908f5f17de7b72d

https://github.com/bminor/glibc/commit/e04afb71771710cdc6025fe95908f5f17de7b72d

Gbp-Pq: Name sanitizer-137440.patch

compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.cpp

index 6d61d276d77e35d20fb7bc0712aa659f4e89b7a1..ba3eca82dc888f618a93d35d9bc7895d72dfe7f0 100644 (file)
@@ -479,9 +479,6 @@ unsigned struct_ElfW_Phdr_sz = sizeof(Elf_Phdr);
   unsigned struct_input_id_sz = sizeof(struct input_id);
   unsigned struct_mtpos_sz = sizeof(struct mtpos);
   unsigned struct_rtentry_sz = sizeof(struct rtentry);
-#if SANITIZER_GLIBC || SANITIZER_ANDROID
-  unsigned struct_termio_sz = sizeof(struct termio);
-#endif
   unsigned struct_vt_consize_sz = sizeof(struct vt_consize);
   unsigned struct_vt_sizes_sz = sizeof(struct vt_sizes);
   unsigned struct_vt_stat_sz = sizeof(struct vt_stat);